import json

import yaml


class Data_file:


    def get_data_yaml(self,data_file):

        # with open('data/add.yaml', 'r', encoding='UTF-8') as f:
        with open(data_file, 'r', encoding='UTF-8') as f:
            data = yaml.load(f, Loader=yaml.FullLoader)
        return data

    def get_data_json(self,data_file):

        # with open('data/add.yaml', 'r', encoding='UTF-8') as f:
        with open(data_file, 'r', encoding='UTF-8') as f:
            data = json.load(f)
        return data
# get_data()
